home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / CHIP 2005-06.iso / program / grafik / myriad.exe / Disk1 / data1.cab / Intgclt_-_Common / myrcmd.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-05-12  |  3.5 KB  |  77 lines

  1. //*************************************************************
  2. //  File name: MYRCMD.H
  3. //
  4. //*************************************************************
  5.  
  6. #ifndef INC_MYRCMD_H
  7. #define INC_MYRCMD_H
  8.  
  9. #ifndef IGBOOL
  10.   #ifdef __WIN32
  11.     typedef int IGBOOL;
  12.   #else
  13.     typedef long IGBOOL;
  14.   #endif
  15. #endif
  16.  
  17. #include "myrddedf.h"
  18. #include "vwdde.h"
  19.  
  20. #define  CONNECT_RETRY_COUNT        (50)               /* Number of times to retry the operation               */
  21. #define  DEFAULT_TIMEOUT_VALUE      (1000)             /* Time in milliseconds for synchronous sends           */
  22. #define  POP_MESSAGE_QUEUE          (WM_USER+55)
  23.  
  24. #define  MESSAGE_QUEUE_WINDOW_NAME  "QueueWindow"
  25.  
  26. typedef struct {
  27.    void    *Next;
  28.    void    *pData;
  29. } QueueMessage, *pQueueMessage;
  30.  
  31. typedef struct {
  32.     HANDLE                        hThreadDLLHandle;      /* Handle to the DLL for the process                    */
  33.     DWORD                         hInstance;             /* Instance of the DDEML attach                         */
  34.     HCONV                         hConversation;         /* The DDEML conversation handle                        */
  35.     HSZ                           hServerName;           /* Global handle of our server name                     */
  36.     HSZ                           hTopicName;            /* Global handle of our topic name                      */
  37.     HSZ                           hItemName;             /* Global handle of our item name                       */
  38.   HWND                          hNotifyWindow;         /* Handle of client window for notifications            */
  39.   DWORD                         lTransID;              /* DDEML Client transaction result                      */
  40.   BOOL                          bForceSynchronous;     /* If must perform execution synchronously              */
  41.   LPSTR                         pServerName;           /* String format of server name - user specified        */
  42.   BOOL                          bExecutionReturn;      /* Flag indicating an execution_return message occurred */
  43.   HWND                          hQueueWindow;          /* The window that is used by the message queue         */
  44.   pQueueMessage                 pMessageQHead;         /* The head of the message queue                        */
  45.   pQueueMessage                 pMessageQTail;         /* The tail of the message queue                        */
  46.   int                           nNumberMessages;       /* The number of messages in the message queue          */
  47.   CRITICAL_SECTION              CriticalSection;       /* The semaphore used to control message queue access   */
  48. } DDE_DATA;
  49.  
  50. /* Internal DLL routines */
  51. HDDEDATA EXPENTRY DDECallback(WORD wType, WORD wFmt, HCONV hConv, HSZ hsz1,
  52.                   HSZ hsz2, HDDEDATA hData, DWORD lData1, DWORD lData2);
  53.  
  54. BOOL ddeInit(void);
  55. void ddeUnInit(void);
  56. HDDEDATA PerformClientSend(void *pData, DWORD lDataLength, UINT uType, BOOL bSync);
  57. DWORD CalculateAllocationLength(ExecutionCommandType Command, void *pData);
  58. void InitializeDDEControlBlock(void);
  59. void ClearDDEControlBlock(void);
  60. void FreeDDEServerNameString(void);
  61. void DestroyDDEControlBlock(void);
  62. BOOL WaitForExecReturn(void);
  63.  
  64. // queue funcs
  65. void AddToMessageQ(LPARAM pData);
  66. pQueueMessage PopMessageQ(void);
  67. int  NumberMessagesInQ(void);
  68. void ClearMessageQ(void);
  69. void DeleteQMessage(pQueueMessage pMsg);
  70.  
  71. // queue window funcs
  72. void startQueueWindow(DDE_DATA *pDDEData);
  73. void stopQueueWindow(DDE_DATA *pDDEData);
  74. long FAR PASCAL QueueProc(HWND hWnd, unsigned iMessage, WORD wParam, LONG lParam);
  75.  
  76. #endif // INC_MYRCMD_H
  77.